package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.Goods;
import com.xca.znb.model.imodel.IGoodsManager;

public class GoodsManagerImpl implements IGoodsManager {
    private UserDAO userDAO ;
    public GoodsManagerImpl(Context context){
        userDAO = new UserDAO(context);
    }
    @Override
    public Goods getGoodsById(int id) {
        return userDAO.getGoodsById(id);
    }

    @Override
    public void updateGoodsByIdAndState(int id, String type) {
        userDAO.updateGoodsByIdAndState(id, type);
    }

    @Override
    public void deleteGoodsById(int id) {
        userDAO.deleteGoodsById(id);
    }
}
